import request from "@/utils/request";

// 查询防火墙规则列表
export function listRule(query) {
  return request({
    url: "/experiment/rule/list",
    method: "get",
    params: query,
  });
}

// 查询防火墙规则详细
export function getRule(firewallRuleId) {
  return request({
    url: "/experiment/rule/" + firewallRuleId,
    method: "get",
  });
}

// 新增防火墙规则
export function addRule(data) {
  return request({
    url: "/experiment/rule",
    method: "post",
    data: data,
  });
}

// 修改防火墙规则
export function updateRule(data) {
  return request({
    url: "/experiment/rule",
    method: "put",
    data: data,
  });
}

// 删除防火墙规则
export function delRule(firewallRuleId) {
  return request({
    url: "/experiment/rule/" + firewallRuleId,
    method: "delete",
  });
}
